//
//  HomeNetRequest.m
//  TuanLife
//
//  Created by 伏圣文 on 2017/12/23.
//  Copyright © 2017年 HuiNaMac. All rights reserved.
//

#import "HomeNetRequest.h"  
@implementation HomeNetRequest
/**
 打卡初始化
 
 @param parameters 请求参数
 @param responseBlock 返回参数
 */

+ (void)signInitDataRequest:(NSDictionary *)parameters andBlock:(RequestResultSuccess)responseBlock andFailBlock:(RequestResultFailure)failBlock{
      [SVProgressHUD show];
    NSMutableDictionary *dict = [FSWPublicParameterTool fswPublicParameterTool:parameters];
    [[NetWorkBaseAPIManager manager] requestHttpWithMethod:Get url:[KRequesetLinkUrl getUrlByKey:Interface_api_sign_init] parameters:dict isJson:YES success:^(id responseObject) {
        NSInteger code = [responseObject[@"code"] integerValue] ;
        if (code == 200) {
          
        }else{
            failBlock(@"");
        }
    } failure:^(NSString *errorDesc) {
        failBlock(@"");
    }];
}

/**
 打卡
 
 @param parameters 请求参数
 @param responseBlock 返回参数
 */

+ (void)signClockDataRequest:(NSDictionary *)parameters andBlock:(RequestResultSuccess)responseBlock andFailBlock:(RequestResultFailure)failBlock{
    [SVProgressHUD show];
    NSMutableDictionary *dict = [FSWPublicParameterTool fswPublicParameterTool:parameters];
    [[NetWorkBaseAPIManager manager] requestHttpWithMethod:Get url: [KRequesetLinkUrl getUrlByKey:Interface_api_sign_clock] parameters:dict isJson:YES success:^(id responseObject) {
        NSInteger code = [responseObject[@"code"] integerValue] ;
        if (code == 200) {
            
           
        }else{
            NSString *msg = responseObject[@"msg"] ;
            failBlock(msg);
        }
    } failure:^(NSString *errorDesc) {
   
        failBlock(errorDesc);
    }];
}

/**
 更新
 
 @param parameters 请求参数
 @param responseBlock 返回参数
 */

+ (void)getCheckUpdateVersionDataRequest:(NSDictionary *)parameters andBlock:(RequestResultSuccess)responseBlock andFailBlock:(RequestResultFailure)failBlock{
    [[NetWorkBaseAPIManager manager] requestHttpWithMethod:Get url:[KRequesetLinkUrl getUrlByKey:app_check_update] parameters:parameters isJson:YES success:^(id responseObject) {
        NSInteger code = [responseObject[@"code"] integerValue] ;
        if (code == 200) {
          
            
        }else{
            NSString *msg = responseObject[@"msg"] ;
            failBlock(msg);
        }
    } failure:^(NSString *errorDesc) {
        
        failBlock(errorDesc);
    }];
}
@end
